A graphics system generates data regarding the location of geometrical primitives of objects with respect to other objects in a model space. Thus, initially the rendering process generates data to represent all primitives (e.g., polygons and triangles) of the scene. However, a displayed image has an associated viewpoint (also known as an eyepoint) for a viewer to view the image. Depending upon the viewpoint of a scene, some of the objects in a scene may occlude (block) the view of other objects. These occluded regions are also sometimes described as hidden surfaces, since they are hidden from view in the final displayed scene. Consequently, the final displayed image will not include pixel data for occluded primitives.
An efficient graphics pipeline culls (eliminates) occluded primitives (e.g., polygons and triangles) of geometrical objects as early as possible in a rendering process in order to avoid performing unnecessary computations (e.g., shading) for hidden surfaces that will not appear in the final displayed pixels of the image. A common culling technique is Z-culling. Z is a distance on an axis perpendicular to the display image plane towards the viewpoint, with the Z distance being measured from the object to a plane parallel to the display plane. Z-culling commonly involves performing a depth test (also known as a “Z-test”) of the Z value of each sample of a geometrical object with respect to other objects to determine hidden surfaces that may be discarded in regards to further processing. Exemplary Z-culling processes are described in commonly owned U.S. application Ser. Nos. 09/885,665, entitled “Modified Method and Apparatus For Improved Occlusion Culling in Graphics Systems,” by Green et al., filed Jun. 19, 2001; 09/121,317, entitled “Method And Apparatus For Occlusion Culling In Graphics Systems,” filed Jul. 22, 1998; and 09/585,810 entitled “System, Method, and Article of Manufacture For Z-Value and Stencil Culling Prior To Rendering In A Computer Graphics Pipeline,” filed May 31, 2000, the contents of each of which are hereby incorporated by reference.
A conventional Z buffering algorithm is equivalent to searching for the associated Z values for each polygon sample point to find a minimum Z value for each sample point along the Z axis (i.e., a point on one of the polygons that is closest to the viewpoint). Conventionally, a Z-buffer holds a current sample point (x,y) of the smallest Z value so far encountered. During processing of a polygon the intensity of the point is written into a frame buffer depending upon a logical condition between the depth Z, of the current sample point, and the depth so far encountered in the Z buffer (e.g., depending upon whether the depth Z of the current sample point is less than the depth so far encountered in the Z buffer, although other logical conditions are also used in the graphics art).
One drawback of conventional Z-culling is that it occurs later in the rendering process than desired. Additionally, substantial amounts of memory resources must be devoted to Z-culling. This is because Z-culling processes commonly utilize a portion of a frame buffer to create a Z-buffer for defining a Z-cull surface for every sample point in the scene. However, this results in a performance penalty in regards to memory bandwidth and frame buffer interference required to access and utilize Z-buffer data for Z-culling. Consequently, conventional approaches to accelerating Z-culling processes have significant drawbacks in terms of cost and performance.
Therefore, what is desired is an improved Z-culling technique for accelerating Z-culling.